package code_rhapsody.double_pointer;

/**
 * @author Synhard
 * @version 1.0
 * @class Code1
 * @description TODO
 * @tel 13001321080
 * @email 823436512@qq.com
 * @date 2021-07-31 8:02
 */
public class Code1 {
    public static void main(String[] args) {

    }

    public int removeElement(int[] nums, int val) {
        int index = 0;
        for (int x : nums) {
            if (x != val) {
                nums[index++] = x;
            }
        }
        return index;
    }
}
